﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using BlueLotus7.ArchiveSystem.Common.Contracts.Sina.Weibo;

namespace BlueLotus7.ArchiveSystem.SinaContentApi.Weibo
{
    partial class WeiboContentRetriever
    {
        public List<KeyValuePair<string, string>> RetrieveWeiboQunByUser(long userId)
        {
            List<KeyValuePair<string, string>> result = new List<KeyValuePair<string, string>>();

            if (userId > 0)
            {
                string url = UrlGenerator.GenerateWeiboUserQunListUrl(userId);
                string htmlContent = RetrieveContentByUrl(url);

                result = ContentAnalyzer.TranslateWeiboUserQunList(htmlContent);
            }

            return result;
        }
    }
}
